<template>
  <view class="">
    <cu-custom bgColor="bg-gradual-red" :isBack="true">
      <view slot="backText">返回</view>
      <view slot="content">{{cardInfo.name}}</view>
    </cu-custom>
    <card-list :cardList="cardInfo.cardList" :isCard="isCard"></card-list>
  </view>
</template>

<script>
  import CardList from '../../components/home/card-list.vue'
  import moreData from '../../data/more.js'
  export default {
    components: {
      CardList
    },
  	data () {
      return {
        cardsInfo: moreData.cardsInfo,
        isCard: false,
        cardInfo: {}
      }
    },
    onLoad(res) {
      if (res.name) {
        this.cardInfo = this.cardsInfo.find(item => item.name == res.name)
      } else if (res.id >= 0) {
        this.cardInfo = this.cardsInfo.find(item => item.id == res.id)
      }
    }
  }
</script>

<style>
</style>
